package com.spzx.product.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.spzx.common.core.annotation.Excel;
import com.spzx.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 商品分类
 * </p>
 *
 * @author lee
 * @since 2024-07-13
 */
@Getter
@Setter
public class Category extends BaseEntity {

    private static final long serialVersionUID = 1L;


    /** 分类名称 */
    @Excel(name = "分类名称")
    @Schema(description = "分类名称")
    private String name;

    /** 图标地址 */
    @Excel(name = "图标地址")
    @Schema(description = "图标地址")
    private String imageUrl;

    /** 上级分类id */
    @Excel(name = "上级分类id")
    @Schema(description = "上级分类id")
    private Long parentId;

    /** 是否显示[0-不显示，1显示] */
    @Excel(name = "是否显示", readConverterExp = "0=不显示,1=显示")
    @Schema(description = "是否显示[0-不显示，1-显示]")
    private Integer status;

    /** 排序 */
    @Excel(name = "排序")
    @Schema(description = "排序")
    private Long orderNum;

    /**
     * 是否有子节点
     */
    @TableField(exist = false)
    private Boolean hasChildren;

    /**
     * 子节点列表
     */
    @TableField(exist = false)
    private Boolean children;
}
